Skip to content

Default inner constructor#79

Merged
sunoru merged 1 commit intoJuliaRandom:masterfrom
YingboMa:myb/inner
Jul 21, 2021
Merged

Default inner constructor#79
sunoru merged 1 commit intoJuliaRandom:masterfrom
YingboMa:myb/inner

Conversation

@YingboMa
Copy link
Contributor

No description provided.

@sunoru
Copy link
Member

sunoru commented Jul 18, 2021

Hi, thanks for the pr, but I'm sorry I couldn't get what this inner constructor is for... Doesn't it make all Xoroshiro128(x, y) calls from outside return a Xoroshiro128(0, 0)?

@YingboMa
Copy link
Contributor Author

Oh, right. It should be new(x, y), shouldn't it.

@sunoru
Copy link
Member

sunoru commented Jul 21, 2021

Yeah. Why is this necessary?

@YingboMa
Copy link
Contributor Author

So it's copy-paste-able from the printing

julia> Xorshifts.Xoroshiro128()
RandomNumbers.Xorshifts.Xoroshiro128(0x862c413b9d2f217c, 0x5ce0ec59c094162b)

julia> RandomNumbers.Xorshifts.Xoroshiro128(0x862c413b9d2f217c, 0x5ce0ec59c094162b)
RandomNumbers.Xorshifts.Xoroshiro128(0x862c413b9d2f217c, 0x5ce0ec59c094162b)

@ChrisRackauckas
Copy link
Contributor

It's a standard across Julia for 2-argument show methods to be round-trippable.

@sunoru
Copy link
Member

sunoru commented Jul 21, 2021

Oh I see, I didn't realize this method is not automatically generated.

@sunoru sunoru merged commit 6e74016 into JuliaRandom:master Jul 21, 2021
@YingboMa YingboMa deleted the myb/inner branch July 22, 2021 01:20
@ChrisRackauckas
Copy link
Contributor

Could this please get a tag?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants